Skip to content

[VL] Restrict -Wno-class-memaccess flag to GNU compiler#11429

Merged
PHILO-HE merged 2 commits intoapache:mainfrom
liujiayi771:clang-error
Jan 19, 2026
Merged

[VL] Restrict -Wno-class-memaccess flag to GNU compiler#11429
PHILO-HE merged 2 commits intoapache:mainfrom
liujiayi771:clang-error

Conversation

@liujiayi771
Copy link
Contributor

What changes are proposed in this pull request?

Only GNU GCC supports this flag; using Clang to compile will result in an error.

How was this patch tested?

N/A

endif()

if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND "${CMAKE_CXX_COMPILER_ID}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. Since -Wno-class-memaccess is a GNU-specific flag (and likely independent of the OS), can we remove the first condition and only check the compiler ID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PHILO-HE Yes, I’ve also considered removing this part before. The "Darwin" check here was likely added because macOS defaults to Clang, which caused some compilation failures.

Copy link
Member

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@PHILO-HE PHILO-HE changed the title [CORE] Only add -Wno-class-memaccess in CMAKE_CXX_FLAGS for GNU [VL] Restrict -Wno-class-memaccess flag to GNU compiler Jan 19, 2026
@PHILO-HE PHILO-HE merged commit ac1780a into apache:main Jan 19, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants